package com.dr.java.day03;

/**
 * Created by rui on 2017/12/29.
 */
public class Function01 {
    public static void main(String[] args) {

        int a1 = 30;
        int a2 = 20;
        getResult();
        System.out.println(getSum(a1, a2));
        System.out.println(getMaxValue(a1, a2));
        System.out.println(isSameValue(a1, a2));
    }

    private static boolean isSameValue(int a1, int a2) {
        return a1 == a2;
    }

    private static int getMaxValue(int a1, int a2) {
        return a1 > a2 ? a1 : a2;
    }

    private static int getSum(int a1, int a2) {
        return a1 + a2;
    }

    private static void getResult() {
        int x = 4;
        System.out.println(x * 3 + 5);

        x = 6;

        System.out.println(x * 3 + 5);
    }
}
